package org.call.hi;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
	
	 @Autowired
	    HelloRemote HelloRemote;
		
	    @RequestMapping("/hello/{name}")
	    public String index(@PathVariable("name") String name) {
	        return HelloRemote.index(name);
	    }
	    
	    @RequestMapping("/hihi/{name}")
	    public String index33(@PathVariable("name") String name) {
	        return HelloRemote.index(name);
	    }
	    
	    @RequestMapping("/hi")
	    public String index22() {
	        return "this is a test";
	    }
	    
	    @Autowired
	    HelloService helloSet;
	    
	    @RequestMapping("/hi123/{name}")
	    public String index55(@PathVariable("name") String name) {
	        return helloSet.hiService(name);
	    }
	    
	    
	    @RequestMapping("/hi55/{name}")
	    public String index66(@PathVariable("name") String name) {
	        return helloSet.hiService3(name);
	    }
	    
	    @Autowired
	    IServerHi hiser;
	    
	    @RequestMapping("/hi6")
	    public String index61() {
	        return hiser.indexHI();
	    }
	    

}
